/*
 * this one will use <inttypes.h> on reasonable systems
 * and define them when that one doesnt exist (win32)
 */

#ifndef INCLUDED_INTTYPES_H
#define INCLUDED_INTTYPES_H

#if defined(_WIN32)
	typedef signed char      int8_t;
	typedef signed short     int16_t;
	typedef signed int       int32_t;
	typedef signed long long int64_t;

	typedef unsigned char      uint8_t;
	typedef unsigned short     uint16_t;
	typedef unsigned int       uint32_t;
	typedef unsigned long long uint64_t;
#else
	/* this should be a reasonable guess */
#include <inttypes.h>
#endif

#ifdef __cplusplus
#include <cassert>
#else
#include <assert.h>
#endif

#define assert_inttypes() \
	{ \
		assert(sizeof(int8_t)  == sizeof(uint8_t)  && sizeof(int8_t)  == 1); \
		assert(sizeof(int16_t) == sizeof(uint16_t) && sizeof(int16_t) == 2); \
		assert(sizeof(int32_t) == sizeof(uint32_t) && sizeof(int32_t) == 4); \
		assert(sizeof(int64_t) == sizeof(uint64_t) && sizeof(int64_t) == 8); \
	}
							  
	
#endif /* INCLUDED_INTTYPES_H */
